﻿<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<!--#include file="admin_inc/admin.sqlfunction.asp" -->
<%
'作者：山林客（ah_bill）
'博客：http://ruizhinet.blog.163.com
'网站：http://www.ruizhinet.cn
'本信息不会影响您网站的正常访问，请保留
checkadmin(4)
dim myURL,act,sql,rs,MyPage,i
checkadmin(4)
dim page
page=GetIntQueryString("page")
Server.ScriptTimeout=500						
myURL=Request.ServerVariables("URL")
act=HTMLEncode(Request.Form("act"))
If act="Remove" Then
	Call DeleteRecord()
End If
If act="RemoveAll" Then
	Call DeleteAllRecord()
End If
Sub DeleteRecord()
dim id 
id = Trim(request.form("id"))
conn.execute("delete from c_log where id in ( " & id & ")")
Response.Redirect myURL
End Sub
Sub DeleteAllRecord()
conn.execute("delete from c_log")
Response.Redirect myURL
End sub
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理日志</title>
<link type="text/css" href="style/style.css" rel="stylesheet" rev="stylesheet"/>
<script type="text/javascript" src="admin_js/common.js"></script> 
</head>
<body>
<form id="rzform" name="rzform" action="manage_log.asp" method="post">
<input type="hidden" name="act" id="act" value="Remove">
<table class="table_800" cellpadding="0" cellspacing="0">
<tr>
	<th>序号</th><th>管理员</th><th>时间</th><th>操作</th><th>URL</th><th>ID/File</th><th>IP</th>
</tr>
<%
sql="select * from c_log order by id desc"
Set MyPage = New RZPage
MyPage.SetSQL = sql
MyPage.PageSize = 20
MyPage.SetCss_PreNext="nextprev"
MyPage.SetCss_NumPage="pagenum"
MyPage.SetCss_CurrentPage="currentpage"
Set rs = MyPage.GetRS()
For i=1 To MyPage.PageSize
If Not rs.EOF Then 
%>
<tr  class="row">
 <td><input name="id" type="checkbox" id="id" value="<%=rs("id")%>"   onclick="chkRow(this);"></td>
 <td><%=rs("username")%></td>
 <td><%=rs("actiontime")%></td>
 <td><%=rs("actionname")%></td>
 <td><%=rs("actionurl")%></td>
  <td><textarea><%=rs("actionids")%></textarea></td>
 <td><%=rs("actionip")%></td>
</tr>
<%
rs.Movenext
Else
Exit For
End If
Next
%>
<tr>
<td colspan="7" class="tdcenter">
<input name="selectall" type="checkbox" id="selectall" value="" onClick="selectAll();" />全选&nbsp;&nbsp;&nbsp;<input type="button" name="action" class="btn" onclick="checkLogDelete();" value="删除">&nbsp;&nbsp;<input type="button" name="action" class="btn" onclick="checkLogClear();" value="清空所有日志">
</td>
</tr>
</table>
</form>
<div id="bottompage">
<%MyPage.ShowPage()%>
<span class="recordcount">
<%MyPage.ShowPageInfo()%>
</span>
</div>
</body>
</html>